package cn.wolfcode.crm.web.controller;

import cn.wolfcode.crm.query.ProductQueryObejct;
import cn.wolfcode.crm.service.IProductstockallocationService;
import cn.wolfcode.crm.util.PageResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/productstockallocation")
public class ProductstockallocationController {

    @Autowired
    private IProductstockallocationService productstockallocationService;

    @RequestMapping("")
    public String view(){

        return "productstockallocation";
    }
    @RequestMapping("/list")
    @ResponseBody
    public PageResult list(@ModelAttribute("qo")ProductQueryObejct qo){

        PageResult result = productstockallocationService.queryForList(qo);
        return result;
    }

}
